package com.gzbugu.bugusys.vo.abs;

import java.sql.Timestamp;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.gzbugu.bugusys.vo.Type;

/**
 * AbstractCoCertificate entity provides the base persistence definition of the
 * CoCertificate entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractCoCertificate implements java.io.Serializable {

	// Fields

	private Integer id;
	private Type type;
	private String name;
	private Date issueDate;
	private String issueUnit;
	private Date validityPeriod;
	private Date uploadDate;
	private String url;

	// Constructors

	/** default constructor */
	public AbstractCoCertificate() {
	}

	/** full constructor */
	public AbstractCoCertificate(Type type, String name, Timestamp issueDate,
			String issueUnit, Date validityPeriod, Timestamp uploadDate,
			String url) {
		this.type = type;
		this.name = name;
		this.issueDate = issueDate;
		this.issueUnit = issueUnit;
		this.validityPeriod = validityPeriod;
		this.uploadDate = uploadDate;
		this.url = url;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "type_id", nullable = true)
	public Type getType() {
		return this.type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	@Column(name = "name", nullable = true, length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "issue_date", nullable = true, length = 10)
	public Date getIssueDate() {
		return this.issueDate;
	}

	public void setIssueDate(Date issueDate) {
		this.issueDate = issueDate;
	}

	@Column(name = "issue_unit", nullable = true, length = 50)
	public String getIssueUnit() {
		return this.issueUnit;
	}

	public void setIssueUnit(String issueUnit) {
		this.issueUnit = issueUnit;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "validity_period", nullable = true, length = 10)
	public Date getValidityPeriod() {
		return this.validityPeriod;
	}

	public void setValidityPeriod(Date validityPeriod) {
		this.validityPeriod = validityPeriod;
	}

	@Column(name = "upload_date", nullable = true, length = 10)
	public Date getUploadDate() {
		return this.uploadDate;
	}

	public void setUploadDate(Date uploadDate) {
		this.uploadDate = uploadDate;
	}

	@Column(name = "url", nullable = true)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

}